#include <iostream>
using namespace std;
class Point {
int x, y;
static int count;
public :
Point(int x = 0, int y = 0) :x(x), y(y)
{
count++;
}
~Point()
{
count--;
}
int getx() { return x; }
int gety() { return y; }
void showCount()
{
cout << "obgect count=" << count << endl;

}
};
int Point::count = 0;//静态数据成员定义和初始化，使用类名限定。
int main()
{
Point a(4, 5);
cout << "point A:" << a.getx() << " ," << a.gety() << endl;
a.showCount();

Point b;
cout << "Point B:" << b.getx() <<" ," << b.gety() << endl;
b.showCount();
return 0;
}